<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>Boost.Sort: I:/modular-boost/libs/sort/include/boost/sort/spreadsort/detail/constants.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Boost.Sort
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1878a3f4746a95c6aad317458cc7ef80.html">boost</a></li><li class="navelem"><a class="el" href="dir_0dcad0da4f36218cbabb216021de9867.html">sort</a></li><li class="navelem"><a class="el" href="dir_4aa236a92b75d6f514e733718a475329.html">spreadsort</a></li><li class="navelem"><a class="el" href="dir_1b6f0a484b3a75c2ed43dc394e95eff6.html">detail</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">constants.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="constants_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">//constant definitions for the Boost Sort library</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">//          Copyright Steven J. Ross 2001 - 2014</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">//    (See accompanying file LICENSE_1_0.txt or copy at</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">//          http://www.boost.org/LICENSE_1_0.txt)</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">//  See http://www.boost.org/libs/sort for library home page.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#ifndef BOOST_SORT_SPREADSORT_DETAIL_CONSTANTS</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#define BOOST_SORT_SPREADSORT_DETAIL_CONSTANTS</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="namespaceboost.html">   11</a></span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceboost.html">boost</a> {</div>
<div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="namespaceboost_1_1sort.html">   12</a></span>&#160;<span class="keyword">namespace </span>sort {</div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="namespaceboost_1_1sort_1_1detail.html">   13</a></span>&#160;<span class="keyword">namespace </span>detail {</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">//Tuning constants</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">//This should be tuned to your processor cache;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">//if you go too large you get cache misses on bins</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">//The smaller this number, the less worst-case memory usage.</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">//If too small, too many recursions slow down spreadsort</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a17b216febe1b5e8212a80231592fc9d9">   19</a></span>&#160;<span class="keyword">enum</span> { <a class="code" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a17b216febe1b5e8212a80231592fc9d9">max_splits</a> = 11,</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">//It&#39;s better to have a few cache misses and finish sorting</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">//than to run another iteration</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907acfdc43b3d7aa6df69b0f6982918056c7">   22</a></span>&#160;<a class="code" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907acfdc43b3d7aa6df69b0f6982918056c7">max_finishing_splits</a> = <a class="code" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a17b216febe1b5e8212a80231592fc9d9">max_splits</a> + 1,</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">//Sets the minimum number of items per bin.</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a2e171c91f6c9e1d82643e4b35a4c65de">   24</a></span>&#160;<a class="code" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a2e171c91f6c9e1d82643e4b35a4c65de">int_log_mean_bin_size</a> = 2,</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">//Used to force a comparison-based sorting for small bins, if it&#39;s faster.</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">//Minimum value 1</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a53383c14d73d50ed8faaa695d820a5bf">   27</a></span>&#160;<a class="code" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a53383c14d73d50ed8faaa695d820a5bf">int_log_min_split_count</a> = 9,</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">//This is the minimum split count to use spreadsort when it will finish in one</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment">//iteration.  Make this larger the faster std::sort is relative to integer_sort.</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907ae0c3ec0c116b92c92015245fd5024a27">   30</a></span>&#160;<a class="code" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907ae0c3ec0c116b92c92015245fd5024a27">int_log_finishing_count</a> = 31,</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">//Sets the minimum number of items per bin for floating point.</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a0631b5d90d6ff0f1ff5370c616047a33">   32</a></span>&#160;<a class="code" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a0631b5d90d6ff0f1ff5370c616047a33">float_log_mean_bin_size</a> = 2,</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment">//Used to force a comparison-based sorting for small bins, if it&#39;s faster.</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment">//Minimum value 1</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907aa0ee6e920e1d3d09e148ce00a985340c">   35</a></span>&#160;<a class="code" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907aa0ee6e920e1d3d09e148ce00a985340c">float_log_min_split_count</a> = 8,</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">//This is the minimum split count to use spreadsort when it will finish in one</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment">//iteration.  Make this larger the faster std::sort is relative to float_sort.</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a498b754f6198248703d3907562207d28">   38</a></span>&#160;<a class="code" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a498b754f6198248703d3907562207d28">float_log_finishing_count</a> = 4,</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="comment">//There is a minimum size below which it is not worth using spreadsort</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907aff33660c3058d4e081b7d4353aae659d">   40</a></span>&#160;<a class="code" href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907aff33660c3058d4e081b7d4353aae659d">min_sort_size</a> = 1000 };</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;}</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;}</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;}</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="namespaceboost_html"><div class="ttname"><a href="namespaceboost.html">boost</a></div><div class="ttdef"><b>Definition:</b> constants.hpp:11</div></div>
<div class="ttc" id="namespaceboost_1_1sort_1_1detail_html_a7bbd2027f75936442318063f34953907a498b754f6198248703d3907562207d28"><div class="ttname"><a href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a498b754f6198248703d3907562207d28">boost::sort::detail::float_log_finishing_count</a></div><div class="ttdef"><b>Definition:</b> constants.hpp:38</div></div>
<div class="ttc" id="namespaceboost_1_1sort_1_1detail_html_a7bbd2027f75936442318063f34953907ae0c3ec0c116b92c92015245fd5024a27"><div class="ttname"><a href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907ae0c3ec0c116b92c92015245fd5024a27">boost::sort::detail::int_log_finishing_count</a></div><div class="ttdef"><b>Definition:</b> constants.hpp:30</div></div>
<div class="ttc" id="namespaceboost_1_1sort_1_1detail_html_a7bbd2027f75936442318063f34953907acfdc43b3d7aa6df69b0f6982918056c7"><div class="ttname"><a href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907acfdc43b3d7aa6df69b0f6982918056c7">boost::sort::detail::max_finishing_splits</a></div><div class="ttdef"><b>Definition:</b> constants.hpp:22</div></div>
<div class="ttc" id="namespaceboost_1_1sort_1_1detail_html_a7bbd2027f75936442318063f34953907a53383c14d73d50ed8faaa695d820a5bf"><div class="ttname"><a href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a53383c14d73d50ed8faaa695d820a5bf">boost::sort::detail::int_log_min_split_count</a></div><div class="ttdef"><b>Definition:</b> constants.hpp:27</div></div>
<div class="ttc" id="namespaceboost_1_1sort_1_1detail_html_a7bbd2027f75936442318063f34953907a17b216febe1b5e8212a80231592fc9d9"><div class="ttname"><a href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a17b216febe1b5e8212a80231592fc9d9">boost::sort::detail::max_splits</a></div><div class="ttdef"><b>Definition:</b> constants.hpp:19</div></div>
<div class="ttc" id="namespaceboost_1_1sort_1_1detail_html_a7bbd2027f75936442318063f34953907aff33660c3058d4e081b7d4353aae659d"><div class="ttname"><a href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907aff33660c3058d4e081b7d4353aae659d">boost::sort::detail::min_sort_size</a></div><div class="ttdef"><b>Definition:</b> constants.hpp:40</div></div>
<div class="ttc" id="namespaceboost_1_1sort_1_1detail_html_a7bbd2027f75936442318063f34953907a2e171c91f6c9e1d82643e4b35a4c65de"><div class="ttname"><a href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a2e171c91f6c9e1d82643e4b35a4c65de">boost::sort::detail::int_log_mean_bin_size</a></div><div class="ttdef"><b>Definition:</b> constants.hpp:24</div></div>
<div class="ttc" id="namespaceboost_1_1sort_1_1detail_html_a7bbd2027f75936442318063f34953907aa0ee6e920e1d3d09e148ce00a985340c"><div class="ttname"><a href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907aa0ee6e920e1d3d09e148ce00a985340c">boost::sort::detail::float_log_min_split_count</a></div><div class="ttdef"><b>Definition:</b> constants.hpp:35</div></div>
<div class="ttc" id="namespaceboost_1_1sort_1_1detail_html_a7bbd2027f75936442318063f34953907a0631b5d90d6ff0f1ff5370c616047a33"><div class="ttname"><a href="namespaceboost_1_1sort_1_1detail.html#a7bbd2027f75936442318063f34953907a0631b5d90d6ff0f1ff5370c616047a33">boost::sort::detail::float_log_mean_bin_size</a></div><div class="ttdef"><b>Definition:</b> constants.hpp:32</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 7 2015 17:29:22 for Boost.Sort by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
